/*
 * @Author: zhang00001 774004514@qq.com
 * @Date: 2024-06-14 16:17:28
 * @LastEditors: yansheng 610363806@qq.com
 * @LastEditTime: 2024-07-31 22:34:29
 * @FilePath: \vue-admin\src\api\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { httpGet, httpPost, httpPostForm } from '@/utils/request'

// 用户列表
export const getUserlist = (data) => {
    return httpPost({ url: 'admin/user/list', data })
}
export const getUserDetail = (data) => {
        return httpPost({ url: 'admin/user/detail', data })
    }
    // 用户更新
export const userUpdate = (data) => {
    return httpPost({ url: 'admin/user/update', data })
}


export const userRecordUpdate = (data) => {
    return httpPost({ url: 'admin/record/update', data })
}

// 文章列表
export const newsList = (data) => {
    return httpPost({ url: 'admin/news/list', data })
}

export const newsAdd = (data) => {
    return httpPost({ url: 'admin/news/create', data })
}
export const newsDel = (data) => {
    return httpPost({ url: 'admin/news/delete', data })
}

export const newsUpdate = (data) => {
    return httpPost({ url: 'admin/news/update', data })
}
export const newsDetail = (data) => {
    return httpPost({ url: 'admin/news/detail', data })
}
export const newsSync = (data) => {
        return httpPost({ url: 'admin/news/async', data })
    }
    // 新闻上下架
export const newsIsDestroy = (data) => {
    return httpPost({ url: 'admin/news/isDestroy', data })
}

// 获取七牛云上传token
export const getUpdateToken = (data) => {
    return httpPost({ url: 'admin/upload_token', data })
}
export const upload_ali = (data) => {
    return httpPostForm({ url: 'admin/upload_ali', data })
}
export const uploadSysToken = (data) => {
    return httpPostForm({ url: 'admin/stsToken', data })
}

//积分

export const getRecordPointList = (data) => {
    return httpPost({ url: 'admin/record/point_list', data })
}

export const getRecordAdd = (data) => {
    return httpPost({ url: 'admin/record/add', data })
}
export const getRecordDel = (data) => {
    return httpPost({ url: 'admin/record/del', data })
}
export const getRecordConsume = (data) => {
    return httpPost({ url: 'admin/record/consume', data })
}
export const getRecordLogList = (data) => {
    return httpPost({ url: 'admin/record/record_list', data })
}

// 注册管理员
export const adminAdd = (data) => {
        return httpPost({ url: 'admin/register', data })
    }
    // 登录
export const adminLogin = (data) => {
        return httpPost({ url: 'admin/login', data })
    }
    // 获取管理员信息
export const getAdminInfo = (data) => {
        return httpPost({ url: 'admin/get_info', data })
    }
    // 修改管理员信息
export const adminUpdate = (data) => {
        return httpPost({ url: 'admin/update', data })
    }
    // 删除管理员
export const adminDel = (data) => {
        return httpPost({ url: 'admin/del', data })
    }
    // 管理员列表
export const adminList = (data) => {
    return httpPost({ url: 'admin/list', data })
}

// 活动

export const activeList = (data) => {
    return httpPost({ url: 'admin/activity/list', data })
}
export const activeAdd = (data) => {
    return httpPost({ url: 'admin/activity/create', data })
}
export const activeUpdate = (data) => {
    return httpPost({ url: 'admin/activity/update', data })
}
export const activeDel = (data) => {
    return httpPost({ url: 'admin/activity/delete', data })
}

export const activeDestroy = (data) => {
    return httpPost({ url: 'admin/activity/isDestroy', data })
}



// 参加活动的用户
export const activeUser = (data) => {
    return httpPost({ url: 'admin/activity/enroll/user', data })
}

// d短信模板列表
export const smsList = (data) => {
    return httpPost({ url: 'admin/sms/list', data })
}
export const smsDel = (data) => {
    return httpPost({ url: 'admin/sms/delete', data })
}
export const smsAdd = (data) => {
    return httpPost({ url: 'admin/sms/create', data })
}
export const smsUpdate = (data) => {
    return httpPost({ url: 'admin/sms/update', data })
}

// 短信任务

export const smsTaskList = (data) => {
        return httpPost({ url: 'admin/sms/task/list', data })
    }
    // 取消短信任务
export const smsTaskcCancel = (data) => {
        return httpPost({ url: 'admin/sms/task/cancel', data })
    }
    // 发送短信

export const smsTaskSend = (data) => {
    return httpPost({ url: 'admin/sms/send', data })
}

// 奖品列表
export const raffleList = (data) => {
        return httpPost({ url: 'admin/raffle/list', data })
    }
    // 奖品新增
export const raffleAdd = (data) => {
        return httpPost({ url: 'admin/raffle/add', data })
    }
    // 奖品更新
export const raffleUpdate = (data) => {
        return httpPost({ url: 'admin/raffle/update', data })
    }
    // 奖品删除
export const raffleDel = (data) => {
        return httpPost({ url: 'admin/raffle/delete', data })
    }
    // 抽奖所需要的积分
export const rafflePoint = (data) => {
        return httpPost({ url: 'admin/raffle/point', data })
    }
    // 中奖记录
export const raffleLog = (data) => {
        return httpPost({ url: 'admin/raffle/win/list', data })
    }
    // 发货
export const raffleGoods = (data) => {
    return httpPost({ url: 'admin/raffle/send_out_goods', data })
}

// 查看物流
export const raffleLogistics = (data) => {
    return httpPost({ url: 'admin/raffle/logistics', data })
}

// 订单列表
export const orderList = (data) => {
    return httpPost({ url: 'admin/order/list', data })
}

// 订单详情
export const orderDetail = (data) => {
    return httpPost({ url: 'admin/order/detail', data })
}

// 订单发货
export const orderUpdate = (data) => {
        return httpPost({ url: 'admin/order/update', data })
    }
    //
export const goodsList = (data) => {
    return httpPost({ url: 'admin/goods/list', data })
}
export const goodsAdd = (data) => {
    return httpPost({ url: 'admin/goods/add', data })
}
export const goodsUpdate = (data) => {
    return httpPost({ url: 'admin/goods/edit', data })
}
export const goodsOn = (data) => {
    return httpPost({ url: 'admin/goods/on', data })
}

export const goodsDetail = (data) => {
    return httpPost({ url: 'admin/goods/detail', data })
}

export const goodsDel = (data) => {
    return httpPost({ url: 'admin/goods/delete', data })
}
export const noticeAdd = (data) => {
    return httpPost({ url: 'admin/notice/add', data })
}
export const noticePublish = (data) => {
    return httpPost({ url: 'admin/notice/publish', data })
}
export const noticelist = (data) => {
    return httpPost({ url: 'admin/notice/list', data })
}
export const noticeUpdate = (data) => {
    return httpPost({ url: 'admin/notice/update', data })
}

export const noticedelete = (data) => {
    return httpPost({ url: 'admin/notice/delete', data })
}


export const productAdd = (data) => {
    return httpPost({ url: 'admin/product/add', data })
}
export const productPublish = (data) => {
    return httpPost({ url: 'admin/product/publish', data })
}
export const productList = (data) => {
    return httpPost({ url: 'admin/product/list', data })
}
export const productUpdate = (data) => {
    return httpPost({ url: 'admin/product/update', data })
}
export const productDelete = (data) => {
        return httpPost({ url: 'admin/product/delete', data })
    }
    // 回扣列表
export const rebateList = (data) => {
    return httpPost({ url: 'admin/rebate/list', data })
}

// 回扣结算
export const rebateSettle = (data) => {
    return httpPost({ url: 'admin/rebate/settle', data })
}

//结清记录
export const rebateLog = (data) => {
        return httpPost({ url: 'admin/rebate/rr/list', data })

    }
    // 计算记录详情
export const rebateLogDetail = (data) => {
    return httpPost({ url: 'admin/rebate/rr/detail_list', data })

}

// 退款
export const wxpayRefund = (data) => {
    return httpPost({ url: 'admin/wxpay/refund', data })

}
export const adminDelTag = (data) => {
    return httpPost({ url: 'admin/delTag', data })

}

// 意见反馈
export const adviceList = (data) => {
        return httpPost({ url: 'admin/complaint/list', data })

    }
    // 删除
export const DelAdvices = (data) => {
        return httpPost({ url: 'admin/complaint/delete', data })

    }
    // 回复留言
export const replyAdvices = (data) => {
        return httpPost({ url: 'admin/complaint/reply', data })

    }
    // 是否显示
export const complaintOn = (data) => {
        return httpPost({ url: 'admin/complaint/on', data })

    }
    // 用户禁言
export const omplaintBlacklist = (data) => {
        return httpPost({ url: 'admin/complaint/blacklist', data })

    }
    // 取消禁言
export const complaintUnblacklist = (data) => {
    return httpPost({ url: 'admin/complaint/unblacklist', data })

}

// 删除回复
export const replyDelete = (data) => {
    return httpPost({ url: 'admin/complaint/reply/delete', data })

}